
var ns, toast;
var app = new Vue({
    el: '#app',
    data: {
        ID:0,
        orderlist: [],
        statusList: this.statusLists,
        getdata_timeout: null,
        statuscount:[],
        historyList:[],

        orderCount: 0,
        status: '0',
        pageindex: 0,
        pagesize: 20,
        total: {
            ProcessCount: 0,
        },
        // showPopover: false,
        selectId:0,
    },
    methods: {
        get_data:function(){
            var that=this;
            that.historyList=[];
            var option={};
            option.ProductID=that.ID;
            option.action='getproductstock';
            ns.post(option, function(succeed, data, err) {
                if(succeed){
                    that.historyList=data.rows;
                }else{
                    api.toast({
                        msg: err,
                        duration: 2000,
                        location: 'bottom'
                    }); 
                }
                
            });


        },



        set_status_bar: function () {
            var that = this;
            api.setStatusBarStyle({
                style: 'dark',
                color: 'transparent'
            });
        },

    },
});

apiready = function() {
    api.parseTapmode();
    app.set_status_bar();
    ns = window.Foresight.Util;
    app.ID = api.pageParam.id;
    app.get_data();
}
